//
//  MarketIndex.m
//  RedManStock
//
//  Created by lanou3g on 15/7/27.
//  Copyright (c) 2015年 lanou3g. All rights reserved.
//

#import "MarketIndex.h"

@implementation MarketIndex
 
-(void)setValue:(id)value forUndefinedKey:(NSString *)key{
    
    if ([key isEqualToString:@"code"]) {
        
        NSString *str = [NSString stringWithFormat:@"%@",value];
        
        self.codeSB = str;
    }else if ([key isEqualToString:@"nowPrice"]){
        float a = [value floatValue];
        self.nowPriceSB = [NSString stringWithFormat:@"%.2f",a];
        
    }else if ([key isEqualToString:@"updownRate"]){
        
        float a =  (float)[value floatValue]*100;
        
        self.updownRateSB = [NSString stringWithFormat:@"%.2f%%",a];
        
    }else if ([key isEqualToString:@"updown"]){
        
        float a =  (float)[value floatValue];
        
        self.updownSB = [NSString stringWithFormat:@"%.2f",a];
    }
        
    
    
    
    
    
    
}




@end
